package com.mryan.metrics.repository;

import org.springframework.stereotype.Component;

/**
 * @description：TODO
 * @Author MRyan
 * @Date 2021/1/24 11:03
 * @Version 1.0
 */
@Component
public class UserRepository {


//    @Autowired
//    private JdbcTemplate jdbcTemplate;
//
//    public boolean registerUser(String username, String pwd) {
//        String sql = "insert into user (username,pwd) values(?,?)";
//        int update = jdbcTemplate.update(sql, username, pwd);
//        return update == 1 ? true : false;
//    }
//
//
//    public boolean login(String username, String pwd) {
//        String sql = "select pwd from user where username=?";
//        String pwdByquery = Objects.requireNonNull(jdbcTemplate.queryForObject(sql, String.class, username)).trim();
//        return pwd.equals(pwdByquery) ? true : false;
//    }
}
